using Google.ProtocolBuffers;
using micromsg.Proto;
using System;
using System.CodeDom.Compiler;
using System.Diagnostics;
using System.IO;
using System.Runtime.CompilerServices;
namespace micromsg
{
	[GeneratedCode("ProtoGen", "2.3.0.277"), DebuggerNonUserCode, CompilerGenerated]
	public sealed class ModMsgStatus : GeneratedMessageLite<ModMsgStatus, ModMsgStatus.Builder>
	{
		[GeneratedCode("ProtoGen", "2.3.0.277"), DebuggerNonUserCode, CompilerGenerated]
		public sealed class Builder : GeneratedBuilderLite<ModMsgStatus, ModMsgStatus.Builder>
		{
			private bool resultIsReadOnly;
			private ModMsgStatus result;
			protected override ModMsgStatus.Builder ThisBuilder
			{
				get
				{
					return this;
				}
			}
			public override bool IsInitialized
			{
				get
				{
					return this.result.IsInitialized;
				}
			}
			protected override ModMsgStatus MessageBeingBuilt
			{
				get
				{
					return this.PrepareBuilder();
				}
			}
			public override ModMsgStatus DefaultInstanceForType
			{
				get
				{
					return ModMsgStatus.DefaultInstance;
				}
			}
			public int MsgId
			{
				get
				{
					return this.result.MsgId;
				}
				set
				{
					this.SetMsgId(value);
				}
			}
			public SKBuiltinString_t FromUserName
			{
				get
				{
					return this.result.FromUserName;
				}
				set
				{
					this.SetFromUserName(value);
				}
			}
			public SKBuiltinString_t ToUserName
			{
				get
				{
					return this.result.ToUserName;
				}
				set
				{
					this.SetToUserName(value);
				}
			}
			public uint Status
			{
				get
				{
					return this.result.Status;
				}
				set
				{
					this.SetStatus(value);
				}
			}
			public Builder()
			{
				this.result = ModMsgStatus.DefaultInstance;
				this.resultIsReadOnly = true;
			}
			internal Builder(ModMsgStatus cloneFrom)
			{
				this.result = cloneFrom;
				this.resultIsReadOnly = true;
			}
			private ModMsgStatus PrepareBuilder()
			{
				if (this.resultIsReadOnly)
				{
					ModMsgStatus other = this.result;
					this.result = new ModMsgStatus();
					this.resultIsReadOnly = false;
					this.MergeFrom(other);
				}
				return this.result;
			}
			public override ModMsgStatus.Builder Clear()
			{
				this.result = ModMsgStatus.DefaultInstance;
				this.resultIsReadOnly = true;
				return this;
			}
			public override ModMsgStatus.Builder Clone()
			{
				if (this.resultIsReadOnly)
				{
					return new ModMsgStatus.Builder(this.result);
				}
				return new ModMsgStatus.Builder().MergeFrom(this.result);
			}
			public override ModMsgStatus BuildPartial()
			{
				if (this.resultIsReadOnly)
				{
					return this.result;
				}
				this.resultIsReadOnly = true;
				return this.result.MakeReadOnly();
			}
			public override ModMsgStatus.Builder MergeFrom(IMessageLite other)
			{
				if (other is ModMsgStatus)
				{
					return this.MergeFrom((ModMsgStatus)other);
				}
				base.MergeFrom(other);
				return this;
			}
			public override ModMsgStatus.Builder MergeFrom(ModMsgStatus other)
			{
				return this;
			}
			public override ModMsgStatus.Builder MergeFrom(ICodedInputStream input)
			{
				return this.MergeFrom(input, ExtensionRegistry.Empty);
			}
			public override ModMsgStatus.Builder MergeFrom(ICodedInputStream input, ExtensionRegistry extensionRegistry)
			{
				this.PrepareBuilder();
				uint num;
				string text;
				while (input.ReadTag(out num, out text))
				{
					if (num == 0u && text != null)
					{
						int num2 = Array.BinarySearch<string>(ModMsgStatus._modMsgStatusFieldNames, text, StringComparer.get_Ordinal());
						if (num2 < 0)
						{
							this.ParseUnknownField(input, extensionRegistry, num, text);
							continue;
						}
						num = ModMsgStatus._modMsgStatusFieldTags[num2];
					}
					uint num3 = num;
					if (num3 <= 8u)
					{
						if (num3 == 0u)
						{
							throw InvalidProtocolBufferException.InvalidTag();
						}
						if (num3 == 8u)
						{
							this.result.hasMsgId = input.ReadInt32(ref this.result.msgId_);
							continue;
						}
					}
					else
					{
						if (num3 == 18u)
						{
							SKBuiltinString_t.Builder builder = SKBuiltinString_t.CreateBuilder();
							if (this.result.hasFromUserName)
							{
								builder.MergeFrom(this.FromUserName);
							}
							input.ReadMessage(builder, extensionRegistry);
							this.FromUserName = builder.BuildPartial();
							continue;
						}
						if (num3 == 26u)
						{
							SKBuiltinString_t.Builder builder2 = SKBuiltinString_t.CreateBuilder();
							if (this.result.hasToUserName)
							{
								builder2.MergeFrom(this.ToUserName);
							}
							input.ReadMessage(builder2, extensionRegistry);
							this.ToUserName = builder2.BuildPartial();
							continue;
						}
						if (num3 == 32u)
						{
							this.result.hasStatus = input.ReadUInt32(ref this.result.status_);
							continue;
						}
					}
					if (WireFormat.IsEndGroupTag(num))
					{
						return this;
					}
					this.ParseUnknownField(input, extensionRegistry, num, text);
				}
				return this;
			}
			public ModMsgStatus.Builder SetMsgId(int value)
			{
				this.PrepareBuilder();
				this.result.hasMsgId = true;
				this.result.msgId_ = value;
				return this;
			}
			public ModMsgStatus.Builder ClearMsgId()
			{
				this.PrepareBuilder();
				this.result.hasMsgId = false;
				this.result.msgId_ = 0;
				return this;
			}
			public ModMsgStatus.Builder SetFromUserName(SKBuiltinString_t value)
			{
				ThrowHelper.ThrowIfNull(value, "value");
				this.PrepareBuilder();
				this.result.hasFromUserName = true;
				this.result.fromUserName_ = value;
				return this;
			}
			public ModMsgStatus.Builder SetFromUserName(SKBuiltinString_t.Builder builderForValue)
			{
				ThrowHelper.ThrowIfNull(builderForValue, "builderForValue");
				this.PrepareBuilder();
				this.result.hasFromUserName = true;
				this.result.fromUserName_ = builderForValue.Build();
				return this;
			}
			public ModMsgStatus.Builder MergeFromUserName(SKBuiltinString_t value)
			{
				ThrowHelper.ThrowIfNull(value, "value");
				this.PrepareBuilder();
				if (this.result.hasFromUserName && this.result.fromUserName_ != SKBuiltinString_t.DefaultInstance)
				{
					this.result.fromUserName_ = SKBuiltinString_t.CreateBuilder(this.result.fromUserName_).MergeFrom(value).BuildPartial();
				}
				else
				{
					this.result.fromUserName_ = value;
				}
				this.result.hasFromUserName = true;
				return this;
			}
			public ModMsgStatus.Builder ClearFromUserName()
			{
				this.PrepareBuilder();
				this.result.hasFromUserName = false;
				this.result.fromUserName_ = null;
				return this;
			}
			public ModMsgStatus.Builder SetToUserName(SKBuiltinString_t value)
			{
				ThrowHelper.ThrowIfNull(value, "value");
				this.PrepareBuilder();
				this.result.hasToUserName = true;
				this.result.toUserName_ = value;
				return this;
			}
			public ModMsgStatus.Builder SetToUserName(SKBuiltinString_t.Builder builderForValue)
			{
				ThrowHelper.ThrowIfNull(builderForValue, "builderForValue");
				this.PrepareBuilder();
				this.result.hasToUserName = true;
				this.result.toUserName_ = builderForValue.Build();
				return this;
			}
			public ModMsgStatus.Builder MergeToUserName(SKBuiltinString_t value)
			{
				ThrowHelper.ThrowIfNull(value, "value");
				this.PrepareBuilder();
				if (this.result.hasToUserName && this.result.toUserName_ != SKBuiltinString_t.DefaultInstance)
				{
					this.result.toUserName_ = SKBuiltinString_t.CreateBuilder(this.result.toUserName_).MergeFrom(value).BuildPartial();
				}
				else
				{
					this.result.toUserName_ = value;
				}
				this.result.hasToUserName = true;
				return this;
			}
			public ModMsgStatus.Builder ClearToUserName()
			{
				this.PrepareBuilder();
				this.result.hasToUserName = false;
				this.result.toUserName_ = null;
				return this;
			}
			public ModMsgStatus.Builder SetStatus(uint value)
			{
				this.PrepareBuilder();
				this.result.hasStatus = true;
				this.result.status_ = value;
				return this;
			}
			public ModMsgStatus.Builder ClearStatus()
			{
				this.PrepareBuilder();
				this.result.hasStatus = false;
				this.result.status_ = 0u;
				return this;
			}
		}
		public const int MsgIdFieldNumber = 1;
		public const int FromUserNameFieldNumber = 2;
		public const int ToUserNameFieldNumber = 3;
		public const int StatusFieldNumber = 4;
		private static readonly ModMsgStatus defaultInstance;
		private static readonly string[] _modMsgStatusFieldNames;
		private static readonly uint[] _modMsgStatusFieldTags;
		private bool hasMsgId;
		private int msgId_;
		private bool hasFromUserName;
		private SKBuiltinString_t fromUserName_;
		private bool hasToUserName;
		private SKBuiltinString_t toUserName_;
		private bool hasStatus;
		private uint status_;
		private int memoizedSerializedSize = -1;
		public static ModMsgStatus DefaultInstance
		{
			get
			{
				return ModMsgStatus.defaultInstance;
			}
		}
		public override ModMsgStatus DefaultInstanceForType
		{
			get
			{
				return ModMsgStatus.DefaultInstance;
			}
		}
		protected override ModMsgStatus ThisMessage
		{
			get
			{
				return this;
			}
		}
		public int MsgId
		{
			get
			{
				return this.msgId_;
			}
		}
		public SKBuiltinString_t FromUserName
		{
			get
			{
				return this.fromUserName_ ?? SKBuiltinString_t.DefaultInstance;
			}
		}
		public SKBuiltinString_t ToUserName
		{
			get
			{
				return this.toUserName_ ?? SKBuiltinString_t.DefaultInstance;
			}
		}
		public uint Status
		{
			get
			{
				return this.status_;
			}
		}
		public override bool IsInitialized
		{
			get
			{
				return this.hasMsgId && this.hasFromUserName && this.hasToUserName && this.hasStatus;
			}
		}
		public override int SerializedSize
		{
			get
			{
				int num = this.memoizedSerializedSize;
				if (num != -1)
				{
					return num;
				}
				num = 0;
				if (this.hasMsgId)
				{
					num += CodedOutputStream.ComputeInt32Size(1, this.MsgId);
				}
				if (this.hasFromUserName)
				{
					num += CodedOutputStream.ComputeMessageSize(2, this.FromUserName);
				}
				if (this.hasToUserName)
				{
					num += CodedOutputStream.ComputeMessageSize(3, this.ToUserName);
				}
				if (this.hasStatus)
				{
					num += CodedOutputStream.ComputeUInt32Size(4, this.Status);
				}
				this.memoizedSerializedSize = num;
				return num;
			}
		}
		private ModMsgStatus()
		{
		}
		public override void WriteTo(ICodedOutputStream output)
		{
			int arg_06_0 = this.SerializedSize;
			string[] modMsgStatusFieldNames = ModMsgStatus._modMsgStatusFieldNames;
			if (this.hasMsgId)
			{
				output.WriteInt32(1, modMsgStatusFieldNames[1], this.MsgId);
			}
			if (this.hasFromUserName)
			{
				output.WriteMessage(2, modMsgStatusFieldNames[0], this.FromUserName);
			}
			if (this.hasToUserName)
			{
				output.WriteMessage(3, modMsgStatusFieldNames[3], this.ToUserName);
			}
			if (this.hasStatus)
			{
				output.WriteUInt32(4, modMsgStatusFieldNames[2], this.Status);
			}
		}
		public override int GetHashCode()
		{
			int num = base.GetType().GetHashCode();
			if (this.hasMsgId)
			{
				num ^= this.msgId_.GetHashCode();
			}
			if (this.hasFromUserName)
			{
				num ^= this.fromUserName_.GetHashCode();
			}
			if (this.hasToUserName)
			{
				num ^= this.toUserName_.GetHashCode();
			}
			if (this.hasStatus)
			{
				num ^= this.status_.GetHashCode();
			}
			return num;
		}
		public override bool Equals(object object_0)
		{
			ModMsgStatus modMsgStatus = object_0 as ModMsgStatus;
			return modMsgStatus != null && (this.hasMsgId == modMsgStatus.hasMsgId && (!this.hasMsgId || this.msgId_.Equals(modMsgStatus.msgId_))) && (this.hasFromUserName == modMsgStatus.hasFromUserName && (!this.hasFromUserName || this.fromUserName_.Equals(modMsgStatus.fromUserName_))) && (this.hasToUserName == modMsgStatus.hasToUserName && (!this.hasToUserName || this.toUserName_.Equals(modMsgStatus.toUserName_))) && (this.hasStatus == modMsgStatus.hasStatus && (!this.hasStatus || this.status_.Equals(modMsgStatus.status_)));
		}
		public override void PrintTo(TextWriter writer)
		{
			GeneratedMessageLite<ModMsgStatus, ModMsgStatus.Builder>.PrintField("MsgId", this.hasMsgId, this.msgId_, writer);
			GeneratedMessageLite<ModMsgStatus, ModMsgStatus.Builder>.PrintField("FromUserName", this.hasFromUserName, this.fromUserName_, writer);
			GeneratedMessageLite<ModMsgStatus, ModMsgStatus.Builder>.PrintField("ToUserName", this.hasToUserName, this.toUserName_, writer);
			GeneratedMessageLite<ModMsgStatus, ModMsgStatus.Builder>.PrintField("Status", this.hasStatus, this.status_, writer);
		}
		public static ModMsgStatus ParseFrom(byte[] data)
		{
			return ModMsgStatus.CreateBuilder().MergeFrom(data).BuildParsed();
		}
		private ModMsgStatus MakeReadOnly()
		{
			return this;
		}
		public static ModMsgStatus.Builder CreateBuilder()
		{
			return new ModMsgStatus.Builder();
		}
		public override ModMsgStatus.Builder ToBuilder()
		{
			return ModMsgStatus.CreateBuilder(this);
		}
		public override ModMsgStatus.Builder CreateBuilderForType()
		{
			return new ModMsgStatus.Builder();
		}
		public static ModMsgStatus.Builder CreateBuilder(ModMsgStatus prototype)
		{
			return new ModMsgStatus.Builder(prototype);
		}
		static ModMsgStatus()
		{
			ModMsgStatus.defaultInstance = new ModMsgStatus().MakeReadOnly();
			ModMsgStatus._modMsgStatusFieldNames = new string[]
			{
				"FromUserName",
				"MsgId",
				"Status",
				"ToUserName"
			};
			ModMsgStatus._modMsgStatusFieldTags = new uint[]
			{
				18u,
				8u,
				32u,
				26u
			};
			object.ReferenceEquals(micromsg.Proto.ModMsgStatus.Descriptor, null);
		}
	}
}
